<template>
	<!-- 常见问题 -->
	<view>
		<!-- #ifdef APP-PLUS -->
		<view class="status_bar"></view>  
		<!-- #endif -->
		<navbar title="常见问题"></navbar>
		<view class="main">
			<view class="line"></view>
			<view class="maintitle">常见问题</view>
			<view class="item" @click="toDetail(item.id)" v-for="(item,index) in questionList" :key="index">
				<view class="title">{{item.title}}</view>
				<u-icon name="arrow-right" size="26" color="#999999"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				questionList:[]
			}
		},
		onLoad() {
			this.getQuestionlist();
		},
		methods: {
			//答疑列表
			getQuestionlist(){
				this.$api.questionlist().then(res=>{
					this.questionList = res;
				})
			},
			toDetail(id){
				uni.navigateTo({
					url:`./proposalDetail?id=${id}`
				})
			}
		}
	}
</script>

<style lang="scss">
page{
	padding-top: calc(var(--status-bar-height) + 115rpx);
	background-color: #FFFFFF;
}
.main{
	
	.maintitle{
		font-size: 32rpx;
		font-family: Source Han Sans CN;
		font-weight: 600;
		color: #0C0C0C;
		margin: 40rpx 40rpx 30rpx;
	}
	.line{
		width: 750rpx;
		height: 15rpx;
		background-color: $page;
	}
	.item{
		@include between;
		padding: 30rpx;
		border-bottom: 1rpx solid #F1F1F1;
		
		.title{
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: normal;
			color: #000000;
		}
		.right{
			@include align-center;
			
			text{
				font-size: 30rpx;
				font-family: Microsoft YaHei;
				font-weight: 400;
				color: #999999;
				margin-right: 22rpx;
			}
		}
	}
}
</style>
